import Vue from 'vue'
import VueRouter from 'vue-router'
import UI_Router from '@/views/UI_Router.vue'
import MyContacts from '@/views/MyContacts.vue'
import MyAbout from '@/views/MyAbout.vue'
import All_Contacts from '@/views/All_Contacts.vue'
import MyAlice from '@/views/MyAlice.vue'
import MyBob from '@/views/MyBob.vue'
import MyBlog from '@/views/MyBlog.vue'
import MyFax from '@/views/MyFax.vue'

Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    {path:'/',redirect:'/ui_router'},
    {path:'/ui_router',component:UI_Router},
    {
      path: '/contacts',
      component: MyContacts,
      children: [
        {path:'all_contacts',component:All_Contacts},
        {path:'alice',component:MyAlice},
        {
          path: 'bob',
          component: MyBob,
          children: [
            {path:'blog',component:MyBlog},
            {path:'fax',component:MyFax},
          ]
        },
      ]
    },
    {path:'/about',component:MyAbout},
  ]
})

export default router